// filters.js
export const filterType = function(value) {
	if (value) {
		const typeMap = {
			1: "群消息",
			2: "合同",
			3: "房费",
			4: "服务日志",
			5: "舆情",
			6: "考勤打卡",
			7: "群关联",
			8: "群预警",
		};
		return typeMap[value] || "未知类型";
	}
};
export const filterDateTime = function(inputDate) {
	if (inputDate) {
		const dateObj = new Date(inputDate);
		const year = dateObj.getFullYear().toString().slice(2); // 获取年份后两位
		const month = (dateObj.getMonth() + 1).toString().padStart(2, "0"); // 获取月份并补0
		const day = dateObj.getDate().toString().padStart(2, "0"); // 获取日期并补0
		const hours = dateObj.getHours().toString().padStart(2, "0"); // 获取小时并补0
		const minutes = dateObj.getMinutes().toString().padStart(2, "0"); // 获取分钟并补0

		return `${year}-${month}-${day} ${hours}:${minutes}`;
	}
};